#!/usr/bin/env node


let timer1,timer2,num;
num=1;

console.log('timer1启动');

timer1=setInterval(()=>{
  console.log('timer1循环中');
},500);

setTimeout(()=>{
  console.log('timer1结束');
  clearInterval(timer1);
  console.log('timer2启动');
  timer2=setInterval(()=>{
    console.log('timer2循环中');
    num++;
    if(num>5){
      num=0;
      console.log('timer2结束');
      global.clearInterval(timer2);
    }
  },500)
},5000);
